package com.example.diagnose.Domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("article")
@Schema(name = "文章实体类")
@Repository
public class Article {
    @TableId(type = IdType.AUTO)
    @Schema(name = "文章id")
    private int article_id;
    @Schema(name = "文章标题")
    private String title;
    @Schema(name = "文章作者")
    private String author;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(name = "文章发布时间")
    private Date release_time;
    @Schema(name = "文章内容")
    private String content;
    @Schema(name = "文章链接")
    private String link;
}
